﻿using Orchard.ContentManagement;

namespace PlanetTelex.RssViewer.Models {
    public class RssViewerPart : ContentPart {
        /// <summary>
        /// Gets or sets the feed URL.
        /// </summary>
        public string FeedUrl {
            get { return this.Retrieve(r => r.FeedUrl); }
            set { this.Store(r => r.FeedUrl, value); }
        }

        /// <summary>
        /// Gets or sets the number of stories.
        /// </summary>
        public int ItemsToDisplay {
            get { return this.Retrieve(r => r.ItemsToDisplay); }
            set { this.Store(r => r.ItemsToDisplay, value); }
        }

        /// <summary>
        /// Gets or sets the duration of the cache.
        /// </summary>
        public int CacheDuration {
            get { return this.Retrieve(r => r.CacheDuration); }
            set { this.Store(r => r.CacheDuration, value); }
        }

        /// <summary>
        /// Gets or sets a value indicating whether show title in header.
        /// </summary>
        public bool ShowTitleInHeader
        {
            get { return this.Retrieve(r => r.ShowTitleInHeader); }
            set { this.Store(r => r.ShowTitleInHeader, value); }
        }

        /// <summary>
        /// Gets or sets a value indicating whether show author in header.
        /// </summary>
        public bool ShowAuthorInHeader
        {
            get { return this.Retrieve(r => r.ShowAuthorInHeader); }
            set { this.Store(r => r.ShowAuthorInHeader, value); }
        }

        /// <summary>
        /// Gets or sets a value indicating whether show domain in header.
        /// </summary>
        public bool ShowDomainInHeader
        {
            get { return this.Retrieve(r => r.ShowDomainInHeader); }
            set { this.Store(r => r.ShowDomainInHeader, value); }
        }

        /// <summary>
        /// Gets or sets a value indicating whether show titlein footer.
        /// </summary>
        public bool ShowTitleInFooter
        {
            get { return this.Retrieve(r => r.ShowTitleInFooter); }
            set { this.Store(r => r.ShowTitleInFooter, value); }
        }

        /// <summary>
        /// Gets or sets a value indicating whether show author in footer.
        /// </summary>
        public bool ShowAuthorInFooter
        {
            get { return this.Retrieve(r => r.ShowAuthorInFooter); }
            set { this.Store(r => r.ShowAuthorInFooter, value); }
        }

        /// <summary>
        /// Gets or sets a value indicating whether show domain in footer.
        /// </summary>
        public bool ShowDomainInFooter
        {
            get { return this.Retrieve(r => r.ShowDomainInFooter); }
            set { this.Store(r => r.ShowDomainInFooter, value); }
        }

        /// <summary>
        /// Gets or sets a value indicating whether link title to story.
        /// </summary>
        public bool LinkTitle
        {
            get { return this.Retrieve(r => r.LinkTitle); }
            set { this.Store(r => r.LinkTitle, value); }
        }

        /// <summary>
        /// Gets or sets a value indicating whether link the domian.
        /// </summary>
        public virtual bool LinkDomain
        {
            get { return this.Retrieve(r => r.LinkDomain); }
            set { this.Store(r => r.LinkDomain, value); }
        }
    }
}